This second release of ODF brings a lot of improvements: improvement in the overall stability of your part and improvement in the usability of the framework. We had a very simple goal for ODF 2: make the existing code base work better. While our first priority was to fix bugs (we fixed around 400 bugs), our second priority was also to change, when possible, what you or we didn't like in ODF 1. We want to thank everybody for the excellent feedback we got mainly through the ODF-Interest list which has been for us an invaluable tool. The whole ODF team hopes that you will find ODF 2 to be an even better framework than ODF 1.
This document is a quick overview of the changes in ODF 2. For a more detailed description read the "Conversion From ODF 1" and "Fixed Problems" documents.
OpenDoc Specific Features
PresentationChanged
ODF now has better support for ODPart::PresentationChanged. Look at ODFClock for an example.
HighlightChanged
ODF 2 eases the implementation of HighlightChanged by caching the previous highlight state of a facet, making it much easier to support HighlightChanged. Look at ODFTable for an example.
InLimbo recipe
ODF 2 has a better implementation of the OpenDoc InLimbo recipe.
Lazy instantiation of embedded frames
ODF 2 now allows lazy instantiation of embedded frames, which means that your embedding part doesn't have to load all its embedded frames at once but can, instead, load them only when they become visible. Look at ODFDraw for an example.
ODF 2 now correctly supports part properties. Look at ODFClock and ODFContainer for examples.
Support for multiple kind, preferred kind and ODPart::ExternalizeKinds
ODF 2 provides you with full support for multiple kinds, making it easy for you to support different kinds in your part. Look at ODFDraw or ODFBitmap for examples.
Extension
ODF provides a sample extension (ODFColorExtension), used by ODFContainer and ODFBitmap.
Scrolling Focus
ODF now automatically supports the OpenDoc scrolling focus through the FW_CScroller class.
Linking
Linking has been considerably improved in ODF 2 but we are not done. You will see even more improvement in ODF 3.
General Framework Features
FW_CScroller
New API (like RevealRect) and new features (like constrain scrolling used in ODFTable) have been added.
New Internet Layer
There is a new Internet Layer which is aimed at providing Cyberdog support.
New FW_CPictSView class
A new picture class has been added to the view system
New FWThread subsystem in OS layer
Support for PowerPlant and MacApp views
Sample Parts
Along with improvement in the framework we also improved almost all our samples. We tried to make them more useful and use as much of the framework as possible.
ODFTable
ODFTable has gained scrolling and scrolling focus. Notice how ODFTable implements scrolling one cell at a time even with different cell size. ODFTable also now correctly uses facet highlighting.
ODFDraw
New in ODFDraw:
- Lazy instantiation of embedded frames which allows a part to load only visible embedded parts
- Scrolling focus
- The drawing size now takes into account the print settings. To see this in action, choose Page Setup, and modify the "Reduce or Enlarge" value. Values less than 100% (Reduction) will increase the apparent size of the drawing area. Values greater than 100% (enlargement) will decrease the apparent size of the drawing area.
ODFBitmap
ODFBitmap is now Cybderdog-savvy. It can import JPEG MacOS files and read them over the Internet (via Cyberdog) using threads. It will correctly show up in Navigator with the required Cyberdog menus. ODFBitmap also implements the Save As command (for pictures only) required by Cyberdog.
ODFContainer
Implements Part Properties (see ODFClock) and uses the ODFColorExtension (see ODFColorExtension and ODFBitmap).
ODFClock
ODFClock has gained several new features:
- Now uses offscreen drawing, so it is no longer necessary for the clock to draw in XOR mode.
- Adapts its color to the background color, so it can be color coordinated.
- Analog Mode:
-Uses different tick marks, little ovals for five-minute increments, and squares for other increments.
-Uses arcs instead of lines for the hour and minute hands. The sweep second hand is still a line.
- Digital Mode:
-Uses Courier Font, so that the width of the time is more consistent.
-Proportionally scales the font size to the size of the view.
- New dialog to set the face string and a time offset.
- Part properties: when embedded in ODFContainer the face of the clock can take the ODFContainer's background color.
- PresentationChanged: ODFClock now uses two different presentations (digital and analog) to switch back and forth between the digital and analog clock.
ODFForm
ODFForm now has a content model allowing the form to be saved and reopened. Notice how the notification subsystem is used to keep the control's value and the content model synchronized.
ODFColorExtension
This is a new sample implementing a simple OpenDoc extension. This extension implements a GetColor and SetColor API. It is used by the ODFContainer and ODFBitmap samples. When ODFBitmap is embedded inside ODFContainer, clicking on a pixel in ODFBitmap will set the ODFContainer's background color to the pixel color.
ODFCyberStarter
This is a new sample showing what a minimal Cyberdog-savvy ODF-based part should implement. ODFCyberStarter has persistent CyberItems, can read text from the Internet (via Cyberdog) using threads, and shows up in Navigator with the required menus.